package cn.blnp.net.flowable.event.base.signal;

import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.runtime.Execution;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;
import java.util.List;

/**
 * <h3>信号事件定义</h3>
 *
 * @author <a href="mailto:blnp.yibin@qq.com">lyb</a>
 * @version 1.0
 * @since 2025/5/7 9:09
 */
@Slf4j
@SpringBootTest
public class EventSignalTest {

    @Resource
    private RuntimeService runtimeService;
    
    /**
     * <p><b>用途:信号事件基本定义<b></p><br/>
     * <a href="cn/blnp/net/flowable/event/base/signal/信号事件定义.md" >详见文档</a>
     * @author <a href="mailto:blnp.yibin@qq.com">lyb</a>
     * @since 9:11 2025/5/7
     * @params [] 
     * @param  
     * @return void
    **/
    @Test
    public void test() {
        List<Execution> executionList = runtimeService.createExecutionQuery()
                .signalEventSubscriptionName("测试信号")
                .list();
        for (Execution execution : executionList) {
            log.warn("{}", execution);
        }
    }
}
